package com.main;
import com.sort.*;
import java.util.Scanner;
public class BinarySearchDemo{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int temp;
		int ar[] = new int[100];
		System.out.println("Enter the number");
		int n = sc.nextInt();
		System.out.println("Enterd Number Is:");
		for(int i = 0; i<n; i++){
			ar[i] = sc.nextInt();
		}
		for(int i = 0; i<n; i++){
			for(int j= i+1; j < n; j++){
				if(ar[i] > ar[j]){
					temp = ar[i];
					ar[i] = ar[j];
					ar[j] = temp;
				}
			}
		}
		System.out.println("Sorted Number is:");
		for(int i = 0; i<n; i++){
			System.out.println(ar[i]);
		}
		System.out.println("Enter The Search Value is:");
		int val = sc.nextInt();
		SortDemo ad = new SortDemo();
		ad.find(val,ar,n);
	}
}